
package visualisation;


import javax.swing.*
import javax.swing.tree.DefaultMutableTreeNode as TreeNode
import groovy.swing.SwingBuilder
import primitives.cluster.*;
import search.util.*;
import search.fitnessfunctions.*;
import bunchbridge.*;

class TreeDump{

	static def void main(String[] args){


		String filename = args[0];
		ClusterHead ch = TreeLoader2.loadTreeFromSerial(new File(filename));
		if(ch == null){
			System.err.println("ERROR: Tree loaded from " + args[0] + " is null. Aborting metric dump.");
			System.exit(-0xBAD);
		}
/*		try{
			System.out.print (evaluate(tree));
		}catch(NullPointerException npe){
			System.err.println("Caught a NPE! for file " + args[0]);

			ClusterUtils.prettyPrintTree(tree);
			System.exit(-0xBEEF);
		}
		*/

		ClusterUtils.prettyPrintTree(ch);
	
	}
}